package edu.gatech.angry12.UI.client;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.MenuItem;
import com.google.gwt.user.client.Command;

public class SeedAppMain extends Composite {

	Composite toDisplay;
	public SeedAppMain() {
		
		VerticalPanel verticalPanel = new VerticalPanel();
		verticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		initWidget(verticalPanel);
		verticalPanel.setSize("1024", "678px");
		
		SeedAppHeader seedAppHeader = new SeedAppHeader();
		verticalPanel.add(seedAppHeader);
		seedAppHeader.setSize("1024", "70");
		
		MenuBar menuBar = new MenuBar(false);
		menuBar.setStyleName("gwt-SeedApp-MenuBar-background");
		verticalPanel.add(menuBar);
		menuBar.setHeight("33px");
				
		MenuItem mntmNewItem = new MenuItem("Home", false, new Command() {
			public void execute() {
				toDisplay = new Home();
			}
		});
		menuBar.addItem(mntmNewItem);
		
		MenuItem mntmAccount = new MenuItem("Account", false, (Command) null);
		menuBar.addItem(mntmAccount);
		
		MenuItem mntmNewItem_1 = new MenuItem("Listings", false, (Command) null);
		menuBar.addItem(mntmNewItem_1);
		
		MenuItem mntmNewItem_2 = new MenuItem("Exchanges", false, new Command() {
			public void execute() {
				toDisplay = new Exchanges();
				
			}
		});
		menuBar.addItem(mntmNewItem_2);
		
		MenuItem mntmNewItem_3 = new MenuItem("Seeds", false, (Command) null);
		menuBar.addItem(mntmNewItem_3);
		
		MenuItem mntmNewItem_4 = new MenuItem("Admin", false, (Command) null);
		menuBar.addItem(mntmNewItem_4);
		
		
		// Frame frame = new Frame("http://www.google.com");
		// verticalPanel.add(frame);
		verticalPanel.add(toDisplay);
		
		Frame frame = new Frame("http://www.google.com");
		verticalPanel.add(frame);
		frame.setSize("942px", "454px");
		// frame.setSize("1024px", "513px");
		SeedAppFooter seedAppFooter = new SeedAppFooter();
		verticalPanel.add(seedAppFooter);
	}

}
